Repository navigation
feat: advise on empty requirement ledger and add requirements to fit assessment - #716
Merged
Merged
Conversation
…ents; fit assessment plans a requirement per hand-written surface
- WARN_REQUIREMENT_LEDGER_EMPTY in every port's verify (TS, Python, Java/Kotlin, C#, and
Rust's cargo meta verify): never fails a build; off with
"verify": { "requirements": { "missing": "off" } } in .metaobjects/config.json.
An empty ledger, a library's or a dependency's counts as none. Four ledger-empty-*
cases in requirement-check-conformance; options.json takes the verify block.
- ADR-0057 Amendment 1 records the reversal of "no requirements sees no change at all".
- metaobjects-fit-assessment: P5-c plan line (requirement + test per stays-hand-written
surface), requirement-plan JSON claim, never a verdict factor; the 2026-07-12 deferral
is recorded as lifted.
- Docs, changelog fragments, regenerated shipped agent context and conformance fixtures.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What Changed
meta verifynow emits a never-failingWARN_REQUIREMENT_LEDGER_EMPTYadvisory in every port (TypeScript, C#, Java, Python, Rust) when a project has writable entities and declares norequirement.*nodes. Settingverify.requirements.missing: offin the project config silences it. Sharedrequirement-check-conformancefixtures cover the file, library-only, writable-entity, and off cases.Validation
Risk Assessment
✅ Low: The change adds a warning-only advisory with an off switch, applied consistently across ports and pinned by shared corpus cases; the earlier Java dependency-counting defect is fixed in the current code, and what remains is stale documentation and a Rust flag-scoping note.
Testing
This turn re-ran the Rust publish dry run, which now passes after the stale-overlay failure. The Maven mojo Javadoc was checked by reading only; that is not a live scenario, so it is recorded as untested. Earlier rounds drove intent-1 scenarios live; their evidence paths are not restated here. Intent 2 (fit assessment plan line) was not driven live: no LLM spend approved. Overall result: inconclusive, with no known failure.
Evidence: Rust publish dry run log
Pipeline
Updates from git push no-mistakes
✅ **Intent** - passed
✅ No issues found.
✅ **Rebase** - passed
✅ No issues found.
📌 **Review** - 9 issues (1 warning, 8 infos) left as notes at the round cap
server/typescript/packages/cli/src/lib/requirement-payload.ts:97- Theverify.requirements.missing: offswitch is not honored in the requirement payload that the docs-site model explorer embeds.requirementPayload()builds its own scan and does not passrequirementsMissing, so the setting falls back to "warn". Concrete path:.metaobjects/config.jsonhas"libraries": ["iam"]and"verify": { "requirements": { "missing": "off" } }, and the project declares a writable entity. The summary is defined (the library ledger), someta gen(gen.ts:368) andmeta verify --codegen(verify.ts:2010) build the payload. That payload includes a WARN_REQUIREMENT_LEDGER_EMPTY gate row in the generated explorer even though the project turned the advisory off. The main verify path (verify.ts:855) is correct. Fix: addrulesSettingsto thecollectionparameter type and passrequirementsMissing: collection.rulesSettings.requirementsMissingintoscanRequirements. Both callers already pass a fullCollection.server/java/metadata/src/main/java/com/metaobjects/config/RulesSettings.java:89- Moved the orphaned Javadoc/** The constant whose wire name is {@code s}, or {@code null}. */back onto the privateparsehelper. The newRequirementsMissingenum was inserted between that comment andparse, which left two stacked doc comments on the enum.spec/decisions/ADR-0057-requirement-checks-and-tests-in-every-port.md:199- Corrected ADR-0057 Amendment 1, clause 2. It said "the summary staysnull", but theledger-empty-library-onlycase pins the advisory beside a non-null summary when a library ledger is loaded. The clause now reads: the advisory "adds nothing to the summary, which staysnullunless a library's or a dependency's ledger is loaded".🔧 Fix applied.
10 issues (2 warnings, 8 infos) still open:
server/java/metadata/src/main/java/com/metaobjects/config/RulesSettings.java:89- Moved the orphaned Javadoc/** The constant whose wire name is {@code s}, or {@code null}. */back onto the privateparsehelper. The newRequirementsMissingenum was inserted between that comment andparse, which left two stacked doc comments on the enum.spec/decisions/ADR-0057-requirement-checks-and-tests-in-every-port.md:199- Corrected ADR-0057 Amendment 1, clause 2. It said "the summary staysnull", but theledger-empty-library-onlycase pins the advisory beside a non-null summary when a library ledger is loaded. The clause now reads: the advisory "adds nothing to the summary, which staysnullunless a library's or a dependency's ledger is loaded".server/java/metadata/src/main/java/com/metaobjects/requirement/RequirementCheck.java:260- Java and Kotlin count a metadata dependency's entities inwritableProjectEntities. It loops overcoverableEntities(root)(line 240), which has no import filter, and only skips shipped library packages. TypeScript (collection.inCoverage), Python (collection.in_scope), C# (ImportScope.InScope) and Rust (collection.in_scope) all leave dependency entities out. Concrete case: a Maven project depends on a shared model with a writableAccountentity, declares no writable entity or requirement of its own, and runsmetaobjects:verify. It getsWARN_REQUIREMENT_LEDGER_EMPTYcounting 1 entity, while the other ports say nothing; with one own entity it reports 2 instead of 1. This contradicts ADR-0057 Amendment 1, docs/features/requirements.md and the changelog ("a dependency's entities do not count"). Noledger-empty-*corpus case loads a dependency, so conformance does not catch it. Fix inwritableProjectEntities:if (!root.getDependencySet().inScope(ent.getName())) continue;, with a Java test that loads a dependency. The object-coverage loop at line 425 uses the same unfiltered list, but that predates this change.docs/ports/python.md:628- Some text still states the old promise that a model with no requirement sees no change, which is now false when the model has a writable entity. Sites: docs/ports/python.md:628 ("A model with no requirement sees no change"); server/csharp/MetaObjects.Cli/Program.cs:654 ("sees no line and no exit-code change"); spec/roadmap.md:252 ("gets no diagnostics and no generated output", in a dated 2026-08-12 entry, so annotate it only if that history is meant to stay current). These files are outside this change's file list, so they were not edited inline.server/typescript/packages/cli/src/commands/verify.ts:526- Corrected a comment that said a model with no requirement nodes is silent. It now says such a model gets at most the absent-ledger advisory.server/csharp/MetaObjects.Cli/VerifyCommand.cs:300- Corrected theRunRequirementGatedoc comment, which said no line is printed for a model with no requirement. It now names the absent-ledger advisory.server/java/maven-plugin/src/main/java/com/metaobjects/mojo/MetaDataVerifyMojo.java:396- Corrected therunRequirementGateJavadoc, which said nothing is logged for a model with no requirement. It now names the absent-ledger advisory.server/java/metadata/src/main/java/com/metaobjects/requirement/RequirementCheck.java:275- Corrected thecheckJavadoc from "No requirements: no diagnostics" to "at most the absent-ledger advisory".server/csharp/MetaObjects/Core/Requirement/RequirementCheck.cs:347- Corrected theCheckdoc comment from "No requirements: no diagnostics" to "at most the absent-ledger advisory".server/java/maven-plugin/src/main/java/com/metaobjects/mojo/MetaDataVerifyMojo.java:396- The rewrittenrunRequirementGateJavadoc is still inaccurate. It says a model with norequirement.*node "logs at most the absent-ledger advisory". The method returnsrunRequirementLedger(loader) + runRulesGate(loader). A model with no requirements but with declared operations or lifecycles also logs the rules summary line and its diagnostics, and a bad project config logs an error fromrunRulesGate. Scope the sentence to the requirement half, for example: "For a model that declares no {@code requirement.*} node, the requirement ledger logs at most the absent-ledger advisory; the business-rules gate run here reports separately." Comment-only change.🔧 Fix applied.
📌 Review round cap reached: 9 issues (1 warning, 8 infos) left unresolved as notes (no further fix round):
server/java/metadata/src/main/java/com/metaobjects/config/RulesSettings.java:89- Moved the orphaned Javadoc/** The constant whose wire name is {@code s}, or {@code null}. */back onto the privateparsehelper. The newRequirementsMissingenum was inserted between that comment andparse, which left two stacked doc comments on the enum.spec/decisions/ADR-0057-requirement-checks-and-tests-in-every-port.md:199- Corrected ADR-0057 Amendment 1, clause 2. It said "the summary staysnull", but theledger-empty-library-onlycase pins the advisory beside a non-null summary when a library ledger is loaded. The clause now reads: the advisory "adds nothing to the summary, which staysnullunless a library's or a dependency's ledger is loaded".server/typescript/packages/cli/src/commands/verify.ts:526- Corrected a comment that said a model with no requirement nodes is silent. It now says such a model gets at most the absent-ledger advisory.server/csharp/MetaObjects.Cli/VerifyCommand.cs:300- Corrected theRunRequirementGatedoc comment, which said no line is printed for a model with no requirement. It now names the absent-ledger advisory.server/java/maven-plugin/src/main/java/com/metaobjects/mojo/MetaDataVerifyMojo.java:396- Corrected therunRequirementGateJavadoc, which said nothing is logged for a model with no requirement. It now names the absent-ledger advisory.server/java/metadata/src/main/java/com/metaobjects/requirement/RequirementCheck.java:275- Corrected thecheckJavadoc from "No requirements: no diagnostics" to "at most the absent-ledger advisory".server/csharp/MetaObjects/Core/Requirement/RequirementCheck.cs:347- Corrected theCheckdoc comment from "No requirements: no diagnostics" to "at most the absent-ledger advisory".README.md:278- The front-page README still says "A project that declares norequirement.*nodes sees no change at all". That is now false: with one writable entity, everyverifyprintsWARN_REQUIREMENT_LEDGER_EMPTY(ADR-0057 Amendment 1). The round 2 fix for review-4 corrected docs/ports/python.md, Program.cs and spec/roadmap.md but left these siblings: docs/features/extending-with-providers.md:149 (requirements row: "nothing —verifyis silent", under the line 140 claim that an undeclared concern "diagnoses nothing"), and server/python/src/metaobjects/meta/core/requirement/requirements_provider.py:7 ("one that declares none sees nothing"). Reword each to say such a project gets at most the never-failing absent-ledger advisory, with its off switch. Text only.server/rust/metaobjects-cli/src/lib.rs:778- Rust prints the absent-ledger advisory only on a barecargo meta verify: it sits insideif rules, soverify --codegenandverify --templatesstay silent. The other ports run the requirement gate whichever gates are selected, while docs/features/requirements.md says "on everyverifyrun, in every port". This follows Rust's existing rules-gate convention (a named flag runs that gate alone, as docs/features/cli.md states), so no change is needed unless the advisory should appear on gate-specific runs too.server/typescript- Full regression suite (bun testin server/typescript) did not finish within ~50 min; result unknown. Re-run in a longer or sharded lane before merge.agent-context/skills/metaobjects-fit-assessment/SKILL.md- Fit-assessment requirement plan-line change (intent 2) not live-verifiable without LLM spend approval; needs Doug's approval for a skill run or a deterministic check.scripts/ci-local.sh --affected --strict-toolchainsDisposable project in scratch: one writable entity (source.rdb @table customers), no requirement nodes;bun server/typescript/packages/cli/bin/meta.ts verify-> WARN_REQUIREMENT_LEDGER_EMPTY '1 writable entity...', exitCode 0Same project with .metaobjects/config.json verify.requirements.missing=off -> no advisory, exit 0bun testscoped: test/requirement-check-conformance.test.ts, test/gen-requirement-advisories.test.ts, test/requirements-pack-left-out.test.ts, test/verify-bare-default-gates.test.ts -> 67 pass, 0 failFull regression:bun testin server/typescript -> did not complete in ~50 min; process group stopped; no resultNot run: Java/Kotlin/Python/C# ports (advisory in every port per intent; Java dependency-entity fix review-1 untested live); scripts/ci-local.sh --affected (failed on base too)Not driven: fit-assessment skill (agent-context/skills/metaobjects-fit-assessment/SKILL.md P5-c wording) - LLM prompt, needs spend approval🔧 Fix applied.
4 issues (1 error, 3 warnings) still open:
agent-context/skills/metaobjects-fit-assessment/SKILL.md- Fit-assessment plan-line change (intent 2) untested live: running the skill costs LLM spend not approved. Evidence is the diff only; verdict scoring untouched. Needs Doug's approval for a skill run or a deterministic check.server/java/maven-plugin/src/main/java/com/metaobjects/mojo/MetaDataVerifyMojo.java:396- Review-10 (MetaDataVerifyMojo.java runRequirementGate Javadoc) still inaccurate; comment-only fix awaiting decision.scripts/ci-local.sh --affected --strict-toolchainscd server/typescript && bun test packages/cli (2312 pass, 0 fail, 12 skip)bun server/typescript/packages/cli/bin/meta.ts verify on disposable project with writable entity (fixtures/requirement-check-conformance/ledger-empty-writable-entities input): default emits WARN_REQUIREMENT_LEDGER_EMPTY (2 writable entities), exit 0Same project with verify.requirements.missing=off: advisory absent, exit 0Adversarial: model with only a sourceless entity (Draft): no advisory, exit 0🔧 Fix applied.
2 warnings still open:
agent-context/skills/metaobjects-fit-assessment/SKILL.md- Intent 2 (fit assessment covers requirements as a plan line only) is not live-driven: running the skill costs LLM spend that was not approved. Evidence is the diff only. Needs Doug's approval for a skill run or a deterministic check.scripts/ci-local.sh --affected --strict-toolchainsscripts/rust-publish-dry-run.shre-run in the worktree, exit 0 (log at evidence dir rust-dry-run.log)Readserver/java/maven-plugin/src/main/java/com/metaobjects/mojo/MetaDataVerifyMojo.javalines 392-416 and grep of requirement-gate comments (static reading only, not live)No source or test files changed in this turn, so broad regression was not re-run; the configuredscripts/ci-local.sh --affected --strict-toolchainsrun passed at this target commit per the baseline✅ **Document** - passed
✅ No issues found.
✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.